import request from '../utils/request';

const moduleUrl = '/organization';

const organization = {
    createOrganization(data) {
        return request.post(`${moduleUrl}/create`, data);
    },
    getMyOrganizationInfo() {
        return request.get(`${moduleUrl}/me`);
    },
    deleteOrganization(id) {
        return request.delete(`${moduleUrl}/${id}`);
    },
    list(data){
        return request.get(`${moduleUrl}/list`, data);
    },
    approve(data){
        return request.put(`${moduleUrl}/approve`, data);
    },
    reject(data){
        return request.put(`${moduleUrl}/reject`, data);
    },
    update(data){
        return request.put(`${moduleUrl}/update`, data);
    },
};

export default organization;
